package com.tai.design.flyweight;

/**
 * The type Abstract box.
 *
 * @version v1.0
 * @ClassName: AbstractBox
 * @Description: 抽象享元角色
 * @Author: taylor
 */
public abstract class AbstractBox {

    /**
     * Gets shape.
     *
     * @return the shape
     */
//获取图形的方法
    public abstract String getShape();

    /**
     * Display.
     *
     * @param color the color
     */
//显示图形及颜色
    public void display(String color) {
        System.out.println("方块形状：" + getShape() + ", 颜色：" + color);
    }
}
